package unit03.day03;

import java.util.ArrayList;
import java.util.Collection;

import unit03.day02.ObjectDemo1;

/**
 * 集合存放元素存放的是元素的引用地址
 * */
public class CollectionDemo3 {

	public static void main(String[] args) {
		Collection collection = new ArrayList();
		ObjectDemo1 ob = new ObjectDemo1(1,2);
		collection.add(ob);
		System.out.println("o："+ob);
		ob.setX(3);
		System.out.println(collection);
		
	}

}
